# File: run_production_en.ps1
# Description: Production environment startup script

# Set environment variables
$env:FLASK_ENV = "production"
$env:FLASK_APP = "app.py"

Write-Host "Starting production server..." -ForegroundColor Green

# Activate virtual environment
if (Test-Path ".venv\Scripts\Activate.ps1") {
    & ".venv\Scripts\Activate.ps1"
    Write-Host "Virtual environment activated" -ForegroundColor Green
} else {
    Write-Host "Error: Virtual environment not found" -ForegroundColor Red
    exit 1
}

# Start server
Write-Host "Server starting on http://0.0.0.0:5000" -ForegroundColor Green
waitress-serve --host=0.0.0.0 --port=5000 --threads=4 app:application 